//package com.lcy.springtest.conf;
//
//import com.lcy.springtest.bean.Person;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.ComponentScan;
//import org.springframework.context.annotation.ComponentScans;
//import org.springframework.context.annotation.Conditional;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.context.annotation.FilterType;
//import org.springframework.context.annotation.Import;
//
///**
// * 配置类 == 配置文件
// * 使用 @Configuration 告诉 spring 这是一个配置类
// * @author lichenyang
// */
//@Conditional(value = {MacConditional.class})
//@Configuration
////@ComponentScans(value = {
////        @ComponentScan(value = "com.lcy",excludeFilters = {
////        @ComponentScan.Filter(type = FilterType.CUSTOM, classes = {MyFilter.class})
////}, useDefaultFilters = false)
////})
////@ComponentScan(value = "com.lcy")
//@Import({Person.class, MyImportSelector.class, MyImportBeanDefinitionRegistrar.class})
//public class MyConfig {
//    /**
//     * 使用 @Bean 给容器注册一个 bean, 类型是返回值的类型,
//     * id默认用方法名作为id
//     */
////    @Lazy
////    @Bean
////    public Person person(){
////        return new Person(18, "zhangsan");
////    }
//    // 需求: 如果是 windows系统, 就往ioc容器中注入bean,如果是 linux系统 就往ioc容器中注入haha
//    /**
////     * 需求: 根据操作系统来判断将哪个bean注入到spring容器中
////     * 如果是 windows 就注入 bill
////     * 如果是 mac 就注入 haha
////     * @return
////     */
////    @Conditional(value = {WindowsConditional.class})
////    @Bean("bill")
////    public Person person1(){
////        return new Person(21, "bill");
////    }
////
//////    @Conditional(value = {MacConditional.class})
////    @Bean("haha")
////    public Person person2(){
////        return new Person(22, "haha");
////    }
//    @Bean
//    public ColorFactoryBean colorFactoryBean(){
//        return new ColorFactoryBean();
//    }
//}
